﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="AR_Designer.SilverlightControl1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>

        <Style x:Key="GlassBorderStyle" TargetType="Border">
            <Setter Property="BorderThickness" Value="2"/>
            <Setter Property="Padding" Value="5"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.75,1" StartPoint="0.25,0">
                        <GradientStop Color="#33FFFFFF" Offset="0"/>
                        <GradientStop Color="#C0FFFFFF" Offset="0.287"/>
                        <GradientStop Color="#4011322D" Offset="0.683"/>
                        <GradientStop Color="#33FFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="BorderBrush">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#5811322D" Offset="0"/>
                        <GradientStop Color="#3EFFFFFF" Offset="0.25"/>
                        <GradientStop Color="#FFFFFFFF" Offset="0.5"/>
                        <GradientStop Color="#3EFFFFFF" Offset="0.75"/>
                        <GradientStop Color="#BFFFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="Effect">
                <Setter.Value>
                    <DropShadowEffect BlurRadius="3" ShadowDepth="3" Opacity="0.5"/>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="StackPanelMargin" TargetType="StackPanel">
            <Setter Property="Margin" Value="5"/>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">

        
        <Border x:Name="GlassBorder" CornerRadius="10" Style="{StaticResource GlassBorderStyle}" Margin="-12,21,180,32" >
            <StackPanel Margin="5" Background="#45313131">
                <StackPanel Orientation="Horizontal" Style="{StaticResource StackPanelMargin}">
                   <sdk:Label Content="Resolution : "/> 
                   <ComboBox Width="127" HorizontalAlignment="Stretch" /> 
                </StackPanel>
                <StackPanel Orientation="Horizontal" Style="{StaticResource StackPanelMargin}">
                    <sdk:Label Content="Projector mode : "/>
                    <CheckBox Content="Off"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Style="{StaticResource StackPanelMargin}">
                    <Border x:Name="loadXMLBorder" Height="50" Width="100" CornerRadius="10" Style="{StaticResource GlassBorderStyle}">
                        <Button Content="Load XML"/>
                    </Border>
                    <Border x:Name="saveXMLBorder" Height="50" Width="100" CornerRadius="10" Style="{StaticResource GlassBorderStyle}">
                        <Button Content="Save XML"/>
                    </Border>
                </StackPanel>


            </StackPanel>
            <Border.RenderTransform>
                <TranslateTransform X="-210" />
            </Border.RenderTransform>
            <Border.Triggers>
                <EventTrigger x:Name="HoverIn" RoutedEvent="Border.MouseEnter">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
                            <Storyboard>
                                <DoubleAnimation
                                    Storyboard.TargetName="GlassBorder"
                                    Storyboard.TargetProperty="(Border.RenderTransform).(TranslateTransform.X)"
                                    From="-210"
                                    To="-20"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x" />
                                <DoubleAnimation 
                                    Storyboard.TargetName="GlassBorder"
                                    Storyboard.TargetProperty="Opacity"
                                    From="0.9"
                                    To="0.2"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x"/>

                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
                <EventTrigger x:Name="HoverOut" RoutedEvent="Border.MouseLeave">
                    <EventTrigger.Actions>
                        <BeginStoryboard>
<Storyboard>
                                <DoubleAnimation
                                    Storyboard.TargetName="GlassBorder"
                                    Storyboard.TargetProperty="(Border.RenderTransform).(TranslateTransform.X)"
                                    From="-20"
                                    To="-210"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x" />
                                <DoubleAnimation 
                                    Storyboard.TargetName="GlassBorder"
                                    Storyboard.TargetProperty="Opacity"
                                    From="0.2"
                                    To="0.9"
                                    Duration="0:0:0.2"
                                    RepeatBehavior="1x"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger.Actions>
                </EventTrigger>
            </Border.Triggers>
        </Border>
        
        
    </Grid>
</UserControl>
